﻿using OA.UI.MVC.Filters;
using System.Web;
using System.Web.Mvc;

namespace OA.UI.MVC
{
    public class FilterConfig
    {
        public static void RegisterGlobalFilters(GlobalFilterCollection filters)
        {
            filters.Add(new HandleErrorAttribute());

            // filters.Add(new OAAuthorizationFilterAttribute());
            //var obj = DependencyResolver.Current.GetService<OAAuthorizationFilterAttribute>();

            filters.Add(DependencyResolver.Current.GetService<OAAuthorizationFilterAttribute>());

            filters.Add(new OAExceptionAttribute());

        }
    }
}
